﻿using System.ComponentModel.DataAnnotations.Schema;

namespace WJSHWebApi.DBModel
{
    [Table("KWcache_Entity")]
    public class KWcache_Entity : BaseDbmodel
    {
        public int id { get; set; }
        /// <summary>
        /// 料架编号
        /// </summary>
        public int Flow { get; set; }
        public int Area { get; set; }
        /// <summary>
        /// 是否有料
        /// </summary>
        private bool ishave;
        public bool IsHave
        {
            get { return ishave; }

            set
            {
                if (value == false)
                {


                    TaskType = 0;
                }
                ishave = value;
            }
        }

        public bool IsCreat { get; set; }
        public int MaterialName { get; set; }
        public int Deviceid { get; set; }
        /// <summary>
        ///取料归属区域
        /// </summary>
        public int PickAreaType { get; set; }
        /// <summary>
        ///放料归属区域
        /// </summary>
        public int PutAreaType { get; set; }

        /// <summary>
        /// 动作站点
        /// </summary>
        public int Station { get; set; }
        /// <summary>
        /// 前置站点
        /// </summary>
        public int PreStation { get; set; }

        /// <summary>
        /// 后置站点
        /// </summary>
        public int BackStation { get; set; }
        /// <summary>
        /// 对射光电 检测物料
        /// </summary>
        public string OptronicsIO { get; set; }
        /// <summary>
        /// 三色灯+蜂鸣器
        /// </summary>
        public string LigthIO { get; set; }
        public float GetHeight { get; set; }

        public float PutHeight { get; set; }
        /// <summary>
        /// 立库到缓存
        /// </summary>
        public int LW2KWTaskType { get; set; }

        /// <summary>
        /// 缓存到立库
        /// </summary>
        public int KW2LKTaskType { get; set; }


        /// <summary>
        /// 正极粉料到缓存
        /// </summary>
        public int ZJFL2KWTaskType { get; set; }

        /// <summary>
        /// 负极粉料到缓存
        /// </summary>
        public int FJFL2KWTaskType { get; set; }


        /// <summary>
        /// 正极箔材到缓存
        /// </summary>
        public int ZJBC2KWTaskType { get; set; }

        /// <summary>
        /// 负极箔材到缓存
        /// </summary>
        public int FJBC2KWTaskType { get; set; }


        /// <summary>
        /// 负极箔材到缓存
        /// </summary>
        public int FC2KWTaskType { get; set; }



        public int KW2ZJFLTaskType { get; set; }

        public int KW2FJFLTaskType { get; set; }
        public int KW2ZJBCTaskType { get; set; }
        public int KW2FJBCTaskType { get; set; }
        public int KW2FCTaskType { get; set; }


        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; }
        /// <summary>
        /// 说明
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 横坐标
        /// </summary>
        public int GoodX { get; set; }
        /// <summary>
        /// 纵坐标
        /// </summary>
        public int GoodY { get; set; }

        public int BakingState { get; set; }

        public int TaskType { get; set; }
        public int KwType { get; set; }
        public KWcache_Entity Clone()
        {
            return new KWcache_Entity()
            {
                Deviceid = this.Deviceid,
                PickAreaType = this.PickAreaType,
                PutAreaType = this.PutAreaType,
                Station = this.Station,
                OptronicsIO = this.OptronicsIO,
                LigthIO = this.LigthIO,
                IsEnable = this.IsEnable,
                Remark = this.Remark,
            };
        }
    }
}
